package com.maslyk.invitation.entitybean;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Embeddable;


@Embeddable
public class Amount {
	
	@Column(name = "amount")
	private BigDecimal amount;
	
	@Column(name = "isNetAmount")
	private boolean netAmount;
	
	public Amount(BigDecimal _amount, boolean isNetAmount)
	{
		this.amount = _amount.setScale(2, BigDecimal.ROUND_HALF_UP);
		this.netAmount = isNetAmount;
	}

	public BigDecimal getAmount() {
		return amount;
	}
	
	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}
	
	public boolean isNetAmount() {
		return netAmount;
	}
	
	public void setNetAmount(boolean netAmount) {
		this.netAmount = netAmount;
	}
}
